﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WowParserLib.Events;
using WowParserLib.Events.PrefixArgs;

namespace WowParserLib.EventParsers
{
    public class SpellEventArgsParser : EventArgsParser
    {

        public SpellEventArgsParser(int startIndex)
            :base(startIndex)
        {

        }

        #region IArgsParser Members

        public override EventArguments Parse(string[] args)
        {
            //7,8,9
            int spellId = int.Parse(args[StartIndex]);
            SpellSchool school = (SpellSchool)Convert.ToInt32(args[StartIndex + 2], 16);
            return new SpellEventArgs(spellId, args[StartIndex + 1], school);
        }

        #endregion
    }
}
